package com.amigo.online.provider.video.model.entity;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.apache.ibatis.type.Alias;

import com.amigo.online.common.base.entity.BaseEntity;


/**
 * 音乐实体类
 *
 * @author amigo
 */
@Table(name = "music_tbl")
@Alias(value = "music")
public class Music extends BaseEntity {

    /**
     *
     */
    private static final long serialVersionUID = 3675910892723814675L;

    @Column(name = "user_id")
    private Long userId;
    /**
     * 音乐名称
     */
    @Column(name = "name")
    private String name;
    /**
     * 音乐地址
     */
    @Column(name = "music")
    private String music;
    /**
     * 音乐类型
     */
    @Column(name = "category")
    private Integer category;
    /**
     * 音乐封面
     */
    @Column(name = "cover")
    private String cover;
    /**
     * 是否推荐
     */
    @Column(name = "recommended")
    private Integer recommended;
    /**
     * 视频ID
     */
    @Column(name = "video_id")
    private Long videoId;
    /**
     * 使用次数
     */
    @Column(name = "used")
    private Integer used;
    /**
     * 音乐来源  0为系统，1为用户视频提取
     */
    @Column(name = "type")
    private Integer type;
    /**
     * 是否删除
     */
    @Column(name = "deleted")
    private Integer deleted;
    /**
     * 删除时间
     */
    @Column(name = "deleted_time")
    private Long deletedTime;
    /**
     * 音乐作者
     */
    @Column(name = "author")
    private String author;
    /**
     * 音乐时长
     */
    @Column(name = "duration")
    private Double duration;

    @Transient
    private Integer collected;


    public Double getDuration() {
        return duration;
    }

    public void setDuration(Double duration) {
        this.duration = duration;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMusic() {
        return music;
    }

    public void setMusic(String music) {
        this.music = music;
    }

    public Integer getCategory() {
        return category;
    }

    public void setCategory(Integer category) {
        this.category = category;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public Integer getRecommended() {
        return recommended;
    }

    public void setRecommended(Integer recommended) {
        this.recommended = recommended;
    }

    public Long getVideoId() {
        return videoId;
    }

    public void setVideoId(Long videoId) {
        this.videoId = videoId;
    }

    public Integer getUsed() {
        return used;
    }

    public void setUsed(Integer used) {
        this.used = used;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Long getDeletedTime() {
        return deletedTime;
    }

    public void setDeletedTime(Long deletedTime) {
        this.deletedTime = deletedTime;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public Integer getCollected() {
        return collected;
    }

    public void setCollected(Integer collected) {
        this.collected = collected;
    }
}
